﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="score_laoshi.aspx.cs" Inherits="score_laoshi" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">  
    <table style="width: 741px; height: 169px">
        <tr>
            <td  class="font33" style="vertical-align: top; width: 100px" >
                <asp:Label ID="Label3" runat="server" Font-Bold="True" Width="90px">选择课程：</asp:Label>
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="sdsKechent"
                    DataTextField="name" DataValueField="xuesheng" Width="208px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td  class="font33" style="vertical-align: top; width: 100px">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Width="90px">选择学生：</asp:Label>&nbsp;<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="sdsXuesheng"
                    DataTextField="username1" DataValueField="username" Width="117px">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td style="width: 100%; vertical-align: top;" class="fontzxd1">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="830px" OnRowDataBound="GridView1_RowDataBound" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" cssclass="font33">
                    <Columns>
                        <asp:BoundField DataField="kecheng_id" HeaderText="课程编号" SortExpression="kecheng_id" />
                        <asp:BoundField DataField="kecheng" HeaderText="课程名称" SortExpression="kecheng" />
                        <asp:BoundField DataField="res_single" HeaderText="单选题成绩" SortExpression="res_single" />
                        <asp:BoundField DataField="res_more" HeaderText="多选题成绩" SortExpression="res_more" />
                        <asp:BoundField DataField="res_QA" HeaderText="问答题成绩" SortExpression="res_QA" />
                        <asp:BoundField DataField="res_total" HeaderText="总分" SortExpression="res_total" />
                        <asp:BoundField DataField="pingjia" HeaderText="测试成绩" SortExpression="pingjia" />
                        <asp:BoundField DataField="res_xtsj" HeaderText="测试时间" SortExpression="res_xtsj" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <RowStyle BackColor="#F7F7DE" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#D9EDB2"  ForeColor="Black" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 100px; height: 42px">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [kecheng_id], [kecheng], [res_single], [res_more], [res_QA], [res_total],[res_total], [pingjia], [res_xtsj] FROM [tb_StuResult] WHERE ([stu_username] = @stu_username)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList2" Name="stu_username" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 100px; height: 42px">
                <asp:SqlDataSource ID="sdsKechent" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [name], [xuesheng] FROM [kecheng] WHERE (([laoshi] = @laoshi) OR ([writer] = @laoshi))">
                    <SelectParameters>
                        <asp:SessionParameter Name="laoshi" SessionField="sUserName" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 100px; height: 42px">
                <asp:SqlDataSource ID="sdsXuesheng" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [username], [username1], [id] FROM [account] where 1=2">
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</form>
</body>
</html>

